using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace GPSMap
{
    public partial class frmConfig9x9 : Form
    {
        public frmGPSTracking formMain;

        public frmConfig9x9()
        {
            InitializeComponent();
        }

        private string[] bigSquareArray = new string[10];// { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
        private void frmConfig9x9_Load(object sender, EventArgs e)
        {
            string value = Properties.Settings.Default.Coord9x9;
            bigSquareArray = value.Split(new char[] {'|'});
            txtBigSquare1.Text = bigSquareArray[0];
            txtBigSquare2.Text = bigSquareArray[1];
            txtBigSquare3.Text = bigSquareArray[2];
            txtBigSquare4.Text = bigSquareArray[3];
            txtBigSquare5.Text = bigSquareArray[4];
            txtBigSquare6.Text = bigSquareArray[5];
            txtBigSquare7.Text = bigSquareArray[6];
            txtBigSquare8.Text = bigSquareArray[7];
            txtBigSquare9.Text = bigSquareArray[8];
            txtBigSquare10.Text = bigSquareArray[9];
        }

        private void checkBoxShowCoordinate9x9_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void btnUpdate_Click(object sender, EventArgs e)
        {
            bigSquareArray[0] = txtBigSquare1.Text;
            bigSquareArray[1] = txtBigSquare2.Text;
            bigSquareArray[2] = txtBigSquare3.Text;
            bigSquareArray[3] = txtBigSquare4.Text;
            bigSquareArray[4] = txtBigSquare5.Text;
            bigSquareArray[5] = txtBigSquare6.Text;
            bigSquareArray[6] = txtBigSquare7.Text;
            bigSquareArray[7] = txtBigSquare8.Text;
            bigSquareArray[8] = txtBigSquare9.Text;
            bigSquareArray[9] = txtBigSquare10.Text;

            Properties.Settings.Default.Coord9x9 = string.Join("|", bigSquareArray);
            Properties.Settings.Default.Save();
        }
    }
}